#!/usr/bin/perl
##########################################################################
# Servertest.pl
##########################################################################

# -----------------------------------------------------
# Check that all of the required modules can be located

# ---------------------------------
# Let's see what our environment is
  if (!$ENV{'SERVER_SOFTWARE'}) {
    $newline = "\n";
  }
  else {
    print "Content-type: text/html\n\n";
	print "<HTML><BODY>";
    $newline = "<br>\n";
  }


# -------------
# Check for XML::LibXML
  print "Checking for XML::LibXML...";
  eval "use XML::LibXML";
  if ($@) {
    print "$newline"."The XML::LibXML module could not be located.$newline";
  } else {
  print " OK$newline";
}



# -------------
# Check for Image::Magick
  print "Checking for Image::Magick...";
  eval "use Image::Magick";
  if ($@) {
    print "$newline"."The Image::Magick module could not be located.$newline";
  } else {
  print " OK$newline";
}


# -------------
# Check for Digest::MD5
  print "Checking for Digest::MD5...";
  eval "use Digest::MD5";
  if ($@) {
    print "$newline"."The Digest::MD5 module could not be located.$newline";
  } else {
  print " OK$newline";
}


  print "$newline";
  
  print qq~
Everything is in place and functional.
~;